#ifdef _WIN32
#include "VertexLayoutDX9.h"

using namespace Stray;
using namespace Stray::Core;
using namespace Stray::Core::Graphics;
using namespace Stray::Core::Graphics::DirectX9;

VertexLayoutTables d3dVertexDeclToVertexLayoutTables(IDirect3DVertexDeclaration9 *pVertexDecl);
VertexLayoutFormat d3ddeclTypeToLayoutFormat(BYTE type);

VertexLayoutDX9::VertexLayoutDX9(IDirect3DVertexDeclaration9 *pVertexDecl, const VertexLayoutTables& tables)
	:pVertexDecl_(pVertexDecl)
	,tables_(tables)
{
}

VertexLayoutDX9::~VertexLayoutDX9()
{
	if(pVertexDecl_) pVertexDecl_->Release();
}

VertexLayoutTables VertexLayoutDX9::getLayoutTables()
{
	return tables_;
}

void* VertexLayoutDX9::getNativeHandle() const
{
	return pVertexDecl_;
}

#endif